package com.lovo.csc.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * 促销方案表
 */
@Setter
@Getter
@NoArgsConstructor
@TableName("promotional_schemes")
public class PromotionalSchemesBean {
    /**
     * 主键id
     */
    @TableId(value = "pk_promotionalId",type = IdType.AUTO)
    private long promotionalId;
    /**
     * 促销方案编号
     */
    @TableField("p_number")
    private String number;
    /**
     * 促销理由
     */
    @TableField("p_description")
    private String description;
    @TableField("p_Audit")
    @ApiModelProperty("审核状态  0-待审核，1-审核通过，2-审核未通过")
    private int audit;
    @TableField("p_status")
    @ApiModelProperty("状态0-未结束1--已结束")
    private int status;
    /**
     * 促销率
     */
    @TableField("p_rate")
    private float rate;
    @TableField(exist = false)
    @ApiModelProperty("商品的id数组")
    private Integer[] productIdArr;
    /**
     * 商品名集合
     */
    @TableField(exist = false)
    private List<String> productName;

    public PromotionalSchemesBean(String number,String description, float rate,int audit,int status) {
        this.number = number;
        this.description = description;
        this.rate = rate;
        this.audit = audit;
        this.status = status;
    }
}
